#ifndef __EXECUTIONCONTEXT_H__
#define __EXECUTIONCONTEXT_H__

#include <set>

#include "CPU.h"

using namespace std;

// This class provides an execution context for the CPU
class ExecutionContext
{
	public:

		// constructor
		ExecutionContext(void);

		// copy constructor
		ExecutionContext(ExecutionContext &context);

		// destructor
		~ExecutionContext(void);

		// Gets all breakpoints
		set<unsigned int>* get_breakpoints();

		// Starts execution until the CPU halts
		// or until a breakpoint is hit
		void run(CPU* const target);

		// Executes the next instruction
		// ignores breakpoints (since it will stop after one execution anyways)
		void step(CPU* const target);

	private:
		// holds the set of breakpoints
		set<unsigned int> breakpoints;
};
#endif
